import request from '@/utils/request'

export function listTask(query) {
	return request({
		url: '/task/list',
		method: 'get',
		params: query
	})
}

export function getTask(doctorTaskId) {
	return request({
		url: '/task/' + doctorTaskId,
		method: 'get'
	})
}

export function addTask(data) {
	return request({
		url: '/task/add',
		method: 'post',
		data: data
	})
}

export function updateTask(data) {
	return request({
		url: '/task/edit',
		method: 'post',
		data: data
	})
}

export function delTask(doctorTaskId) {
	return request({
		url: '/task/remove/' + doctorTaskId,
		method: 'get'
	})
}

export function exportTask(query) {
	return request({
		url: '/task/export',
		method: 'get',
		params: query
	})
}
